package com.nhh.v.task

import com.nhh.v.service.ScheduledTaskService
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.scheduling.annotation.Scheduled
import org.springframework.stereotype.Component

/**
  * Created by ywp on 2018/9/6.
  */
@Component
class ScheduledTask(@Autowired val schedulerService: ScheduledTaskService) {

  @Scheduled(cron = "*/30 * * * * *")
  def genNhhCoins(): Unit = {
    schedulerService.genNhhCoins()
  }

}
